<template>
  <div>
    <div class="move">
      电影<br />
      <p>当前的组件 id 为：{{ id }}</p>
      <button @click="printThis">打印this</button>
      <br>
      <button @click="goback">后退</button>
    </div>
  </div>
</template>

<script>
export default {
  props: ["id"],
  methods: {
    printThis() {
      console.log(this.$route.query);
    },
    goback(){
      this.$router.go(-1)
    }
  },
};
</script>

<style lang="less" scoped>
.move {
  height: 200px;
  background-color: aqua;
}
</style>
